Circle Enclosing Points - Stochastic Example
emp
LINDO
GAMS
short
1e-6) 'EMP and DE (implicit NA) solution differ', r.l, obj.l;
* Expanded DE with explicit NA constraints in GAMS using the scenario from previous solve.
equation ese(s,i), defnaa(s), defnab(s);
positive variable as(s), bs(s);
ese(s,i).. sqr(s_x(s,i)-as(s)) + sqr(s_y(s,i)-bs(s)) =l= sqr(rs(s));
defnaa(s-1).. as('s1') =e= as(s);
defnab(s-1).. bs('s1') =e= bs(s);
model mse /ese, defnaa, defnab, defobj/;
as.l(s) = (xmin+xmax)/2;
bs.l(s) = (ymin+ymax)/2;
rs.l(s) = sqrt( sqr(as.l(s)-xmin) + sqr(bs.l(s)-ymin) );
solve mse using nlp minimizing obj;
abort$(abs(r.l-obj.l)>1e-6) 'EMP and DE (explicit NA) solution differ', r.l, obj.l;
]]>